package com.meituan.verintreport.db.verint;

import com.meituan.verintreport.db.dto.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface VerintBaseTableDao {
    List<AnswersDto> getAnswerList(@Param("answerId") Integer answerId);

    List<AssesmentsOnFormComponentDto> getAssesmentsOnFormComponentList(@Param("lastKey") String lastKey);

    List<AssesmentsOnFormDto> getAssesmentsOnFormList(@Param("assesmentKey") Long assesmentKey);

    List<EvalsOnFormComponentDto> getEvalsOnFormComponentList(@Param("lastKey") String lastKey);

    List<EvalsOnFormDto> getEvalsOnFormList(@Param("evalKey") Long evalKey);

    List<FlagsOnContactAllDto> getFlagsOnContactAllList(@Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);

    List<FlagsOnContactAllDto> getFlagsOnContactAllListByTime(
            @Param("startTime") String startTime, @Param("endTime") String endTime,
                                                @Param("pageIndex") int pageIndex,
                                                @Param("pageSize") int pageSize);

    List<FormComponentHierarchyDto> getFormComponentHierarchyList(@Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);

    List<FormComponentsDto> getFormComponentsList(@Param("formComponentKey") Integer formComponentKey);

    List<FormComponentsDto> getFormComponentsListByPage(@Param("pageIndex") int pageIndex,
                                                        @Param("pageSize") int pageSize);


    List<FormsDto> getFormsList(@Param("formKey") Integer formKey);

    List<FormsDto> getFormsListByPage(@Param("pageIndex") int pageIndex,
                                      @Param("pageSize") int pageSize);

    List<GroupsDto> getGroupsList(@Param("groupKey") Integer groupKey);

    List<GroupsDto> getGroupsListByPage(@Param("pageIndex") int pageIndex,
                                        @Param("pageSize") int pageSize);

    List<GroupsToUsersDto> getGroupsToUserList(@Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);

    List<SessionsEvaluatedBookedDto> getSessionsEvaluatedBookedList(@Param("sidKey") Long sidKey);

    List<UsersDto> getUsersList(@Param("userKey") Integer userKey);

    List<UsersDto> getUsersListByPage(@Param("pageIndex") int pageIndex,
                                      @Param("pageSize") int pageSize);

    List<AnswersDto> getAnswerListBeforeDateTime(@Param("answerId") Integer answerId, @Param("endTime") String endTime);


    /**
     * 分页获取数据
     * @param pageIndex
     * @param pageSize
     * @return
     */
    List<AnswersDto> getAnswerListByPage( @Param("pageIndex") int pageIndex,
                                          @Param("pageSize") int pageSize);


    List<AssesmentsOnFormDto> getAssesmentsOnFormListBeforeDateTime(@Param("assesmentKey") Long assesmentKey, @Param("endTime") String endTime);

    List<AssesmentsOnFormDto> getAssesmentsOnFormListBeforeDateTimePaged(@Param("beginTime") String beginTime,
                                                                         @Param("endTime") String endTime,
                                                                         @Param("pageIndex") int pageIndex,
                                                                         @Param("pageSize") int pageSize);

    List<AssesmentsOnFormComponentDto> getAssesmentsOnFormComponentListBeforeDateTime(@Param("beginTime") String beginTime,
                                                                                      @Param("endTime") String endTime,
                                                                                      @Param("pageIndex") int pageIndex,
                                                                                      @Param("pageSize") int pageSize);

    List<EvalsOnFormDto> getEvalsOnFormListBeforeDateTime(@Param("evalKey") Long evalKey, @Param("endTime") String endTime);

    List<EvalsOnFormDto> getEvalsOnFormListBeforeDateTimePaged(@Param("beginTime") String beginTime,
                                                               @Param("endTime") String endTime,
                                                               @Param("pageIndex") int pageIndex,
                                                               @Param("pageSize") int pageSize);

    List<EvalsOnFormComponentDto> getEvalsOnFormComponentListBeforeDateTime(@Param("beginTime") String beginTime,
                                                                            @Param("endTime") String endTime,
                                                                            @Param("pageIndex") int pageIndex,
                                                                            @Param("pageSize") int pageSize);

    List<FormComponentsDto> getFormComponentsListBeforeDateTime(Integer maxId, @Param("endTime") String endTime);

    List<SessionsEvaluatedBookedDto> getSessionsEvaluatedBookedListBeforeDateTime(@Param("beginTime") String beginTime,
                                                                                  @Param("endTime") String endTime,
                                                                                  @Param("pageIndex") int pageIndex,
                                                                                  @Param("pageSize") int pageSize);
}

